Skip to content

Rework docs structure#2308

Merged
florimondmanca merged 1 commit into
masterfrom
fm/docs-structure
Jul 21, 2022
Merged

Rework docs structure#2308
florimondmanca merged 1 commit into
masterfrom
fm/docs-structure

Conversation

@florimondmanca
Copy link
Copy Markdown
Contributor

@florimondmanca florimondmanca commented Jul 14, 2022

I didn't raise a discussion about this, but this PR also serves as a hands-on proposal. Happy to discuss separately if need be.

This PR restructures the documentation in four well-visible sections:

View of the updated sidebar navigation

Open for text version
  • Usage
    • Quickstart
    • Advanced usage
  • Guides
    • Async Support
    • HTTP/2 Support
    • Requests Compatibility
    • Troubleshooting
  • API Reference
    • Developer Interface
    • Exceptions
    • Environment variables
  • Community
    • Third-Party Packages
    • Contributing
    • Code of Conduct

This takes inspiration from the 4-part Tutorials/How-To's/Discussions/Reference theorised by Daniele Procida (see What nobody tells you about documentation (talk)).

It doesn't exactly match that structure -- e.g. I don't think we've got something resembling "discussions" yet, although stuff like #207 would be potential candidates.

But we do have different kinds of documentation in HTTPX already. The motivation here was to group them to help people find what they're looking for more easily.

So, each section answers the following questions:

  • Usage - "How do I generally use HTTPX?"
  • Guides - "How do I do X with HTTPX?" (where X = Async, HTTP/2, migrating from Requests, troubleshooting problems)
  • API Reference - "What components are available when coding?"
  • Community - "What surrounds the HTTPX project?"

The only shuffling of content I had to do was split the "Exceptions" docs across Quickstart vs. API Reference, as it mixed general usage hints and reference material. This matches how there's a Exceptions and errors section in the Requests quickstart documentation, and then an Exceptions section on its API Reference page.

@florimondmanca florimondmanca added the docs Changes to the documentation label Jul 14, 2022
@florimondmanca florimondmanca requested a review from a team July 14, 2022 18:16
Comment thread mkdocs.yml
theme:
name: 'material'
features:
- navigation.sections
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • What change does this feature effect?
  • Where would I find this documented?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows showing navigation sections as always-unfolded, instead of foldable groupings as is the default in mkdocs.

This is here: https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-sections

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this clarification enough or are there any changes to the code you'd think worthy?

Copy link
Copy Markdown
Contributor

@lovelydinosaur lovelydinosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section changing is very pleasing on the eye. Certainly an aid to my mental navigation.

Screenshot 2022-07-18 at 10 06 30

Moving that part of the exceptions docs also made much sense to me.

One inline comment which could be addressed. Not strictly a blocker.

Nicely chosen changes, Florimond. 🙏🏼

Copy link
Copy Markdown
Contributor

@j178 j178 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@florimondmanca
Copy link
Copy Markdown
Contributor Author

Let’s merge then! :-)

@florimondmanca florimondmanca merged commit 3a82176 into master Jul 21, 2022
@florimondmanca florimondmanca deleted the fm/docs-structure branch July 21, 2022 06:43
samclearman pushed a commit to titanmsp/httpx that referenced this pull request Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Changes to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants